<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
   <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${ctx}/assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="${ctx}/assets/css/index.css?v=2.3">
     <script src="${ctx}/assets/js/myAlert.js"></script>
    <script>
    var baogaoId='${param.baogaoId}';
     var linkJpg="http://m.zuoxinjiazhang.com/js/zuoxin.jpg";
var title="佐心，教家长做智慧父母。佐心家长平台提供心理咨询，免费提问，培训集训，心理评估，欢迎关注佐心科技微信公众号";
var content="佐心，教家长做智慧父母。佐心家长平台提供心理咨询，免费提问，培训集训，心理评估，欢迎关注佐心科技微信公众号";
    </script>
</head>
<body class="bg-gray">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed am-border-bottom">
    <div class="am-header-left am-header-nav">
        <a onclick="${ctx}/index.jsp"> <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        佐心家长-评估报告
    </h1>
    <div class="am-header-right am-header-nav">
        <span onclick="$('#my-code').modal('open')"><i class="icon_guanzhu"></i></span>
        <a  id="btnfeedback">
            <i class="icon_63"></i>
        </a>
    </div>
</header>
<section class="am-padding-bottom-sm" id="amz-main" data-tag="css-nav">
    <div class="bg-white padding-top-20 am-container am-padding-bottom-sm border-bottom">

        <div class="icon_66">
        </div>
        <div class="am-margin-top-sm">
        <div class="title-1" id="baogaoName"></div>
            <div class="padding-left-right-2">
            <div class="am-container bg-gray-2 font-14 am-padding-top-sm am-padding-bottom-sm border-2"  id="baogaoContent">
            </div>
            </div>
        </div>

        <div class="am-margin-top-sm btn-7" onclick="showPop()">
            分享到朋友圈
        </div>

    </div>

<div class="border-tops border-bottom am-margin-top-sm bg-white padding-top-15 padding-bottom-15">
    <div class="icon_26 am-text-center font-color-12 ">
        推介咨询师
    </div>
    <div class="tjList am-g am-g-fixed font-color-13 am-text-center margin-top-25 am-g-collapse">
      
    </div>
    <div class="  am-text-right am-padding-top-sm  prelative">
       <a href="${ctx}/counseKu.jsp"> <span class="prelative am-margin-right-sm font-color-12"><i class="icon_65"></i>更多咨询师</span></a>
    </div>
</div>

</section>
<!--二维码-->
<div class="am-modal am-modal-alert" tabindex="-1" id="my-code">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">长按微信二维码,<br/>关注佐心科技公众号</div>
        <div class="am-modal-bd">
            <img src="${ctx}/js/ewm.png" style="width:100%;height:100%">
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn">关闭</span>
        </div>
    </div>
</div>
<footer data-am-widget="navbar" class="am-navbar am-cf am-navbar-default bg-white"
        id="">
    <div class="am-g   am-g-collapse am-padding-left-sm">
        <div class="am-u-sm-6 font-color-1 am-padding-right-sm" id="shouchang">
            <div class="btn-5" onclick="$('#my-code').modal('open')"><span class="">关注佐心科技</span></div>
        </div>
        <div class="am-u-sm-6 am-padding-right-sm">
            <a id="hr1"><div class="btn-5" onclick=""><span class="">重新测试</span></div></a>
        </div>
    </div>

</footer>

<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">问题反馈</div>
        <div class="am-modal-bd">
            <textarea rows="3" class="mark_content am-modal-prompt-input"  placeholder="对本产品有什么建议，敬请告知，谢谢！"></textarea>
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>提交</span>
        </div>
    </div>
</div>
<script src="${ctx}/assets/js/jquery.min.js"></script>
<script src="${ctx}/assets/js/amazeui.min.js"></script>
<script src="${ctx}/assets/js/common.js"></script>
<script>
    $(function () {
    
    	var baseResponse=$.ajax({url:"${ctx}/getBaoGao?baogaoId="+baogaoId,async:false});
    	var baogaoJson=JSON.parse(baseResponse.responseText);
		if(baogaoJson.resultCode=="0"){
			$("#baogaoName").html(baogaoJson.baogao.baogaoTitle);
			$("#baogaoContent").html(baogaoJson.baogao.baogaoContent);
			$("#hr1").attr("href","${ctx}/gotoPinggu?flag="+baogaoJson.baogao.pingguId);
		}
    
    	var counselorList=$.ajax({url:"${ctx}/getCounseList?flag=1",async:false});
        var jsonCounselor=JSON.parse(counselorList.responseText);
        if(jsonCounselor.resultCode=="0"){
        	var html="";
        	var leng=4;
        	if(jsonCounselor.counselor.length<4){
        		leng=jsonCounselor.counselor.length;
        	}
        	for(var i=0;i<leng;i++){
		        html+="<div class='am-u-sm-3'>";
		        html+="<div class='am-center width-60px'><img class='img-60' onclick=\"window.location.href='${ctx}/counselorDesc.jsp?tel="+jsonCounselor.counselor[i].counseTel+"'\" src='"+jsonCounselor.counselor[i].personHead+"'></div>";
		        html+="<div>"+jsonCounselor.counselor[i].counseName+"</div>";
		        html+="</div>";
        	}
        	$(".tjList").html(html);
        }
    
    
        $('#btnfeedback').on('click', function () {
            $('#my-prompt').modal({
                relatedTarget: this,
                onConfirm: function (e) {
                    if(""==e.data){
                		myAlert("请输入意见或建议，谢谢");
                		return false;
                	}
                    var gotoTuCao=$.ajax({url:"${ctx}/gotoTuCao?content="+e.data,async:false});
				    var gotoTuCaoJson=JSON.parse(gotoTuCao.responseText);
				    if(gotoTuCaoJson.resultCode=="0"){
				    	myAlert("感谢您的热心回馈，谢谢");
				    }
                },
                onCancel: function (e) {
//                    alert('不想说!');
                }
            });
        });

        $("#shouchang").on('click', function () {
            if ($(this).find("i.icon_48").hasClass("cur")) {
                $(this).find("i.icon_48").removeClass("cur");
            } else {
                $(this).find("i.icon_48").addClass("cur");
            }
        });
    });
</script>
<div style="display:none">
<h3 id="menu-basic" style="display:none">基础接口</h3>    
<span class="desc"  style="display:none">判断当前客户端是否支持指定JS接口</span>    
<button class="btn btn_primary" id="checkJsApi"  style="display:none">checkJsApi</button>    
<h3 id="menu-share"  style="display:none">分享接口</h3>    
<span class="desc" >获取“分享到朋友圈”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareTimeline2" >onMenuShareTimeline</button>    
<span class="desc"  style="display:none">获取“分享给朋友”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareAppMessage"  style="display:none">onMenuShareAppMessage</button>    
<span class="desc"  style="display:none">获取“分享到QQ”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareQQ"  style="display:none">onMenuShareQQ</button>    
<span class="desc"  style="display:none">获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareWeibo"  style="display:none">onMenuShareWeibo</button>       
<h3 id="menu-voice">音频接口</h3>    
<span class="desc">开始录音接口</span>    
<button class="btn btn_primary" id="startRecord2">startRecord</button>    
<span class="desc">停止录音接口</span>    
<button class="btn btn_primary" id="stopRecord">stopRecord</button>    
<span class="desc">播放语音接口</span>    
<button class="btn btn_primary" id="playVoice">playVoice</button>    
<span class="desc">暂停播放接口</span>    
<button class="btn btn_primary" id="pauseVoice">pauseVoice</button>    
<span class="desc">停止播放接口</span>    
<button class="btn btn_primary" id="stopVoice">stopVoice</button>    
<span class="desc">上传语音接口</span>    
<button class="btn btn_primary" id="uploadVoice">uploadVoice</button>    
<span class="desc">下载语音接口</span>    
<button class="btn btn_primary" id="downloadVoice">downloadVoice</button>    
<h3 id="menu-smart">智能接口</h3>    
<span class="desc">识别音频并返回识别结果接口</span>    
<button class="btn btn_primary" id="translateVoice">translateVoice</button>    
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>   
<script>    
var nonceStr;
var timestamp;
var signature;
var appId;
htmlobj=$.ajax({url:"${ctx}/getSign?url="+location.href.split('#')[0],async:false});
var json=JSON.parse(htmlobj.responseText);
signature=json.signature; 
nonceStr=json.nonceStr; 
timestamp=json.timestamp; 
appId=json.appId; 
wx.config({    
debug: false,    
appId: appId,    
timestamp: timestamp,    
nonceStr: nonceStr,    
signature: signature,    
jsApiList: [        
'checkJsApi',    
'onMenuShareTimeline',    
'onMenuShareAppMessage',    
'onMenuShareQQ',    
'onMenuShareWeibo',    
'hideMenuItems',    
'showMenuItems',    
'hideAllNonBaseMenuItem',    
'showAllNonBaseMenuItem',    
'translateVoice',    
'startRecord',    
'stopRecord',    
'onRecordEnd',    
'playVoice',    
'pauseVoice',    
'stopVoice',    
'uploadVoice',    
'downloadVoice',    
'chooseImage',    
'previewImage',    
'uploadImage',    
'downloadImage',    
'getNetworkType',    
'openLocation',    
'getLocation',    
'hideOptionMenu',    
'showOptionMenu',    
'closeWindow',    
'scanQRCode',    
'chooseWXPay',    
'openProductSpecificView',    
'addCard',    
'chooseCard',    
'openCard'
]    
});    
</script>  
<script type="text/javascript">
wx.ready(function () {
// 1 判断当前版本是否支持指定 JS 接口，支持批量判断
document.querySelector('#checkJsApi').onclick = function () {
  wx.checkJsApi({
    jsApiList: [
      'getNetworkType',
      'previewImage'
    ],
    success: function (res) {
    }
  });
};
// 2. 分享接口
// 2.1 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareAppMessage({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    success: function (res) {
      alert('已分享');
    },
    cancel: function (res) {
      alert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareTimeline({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    success: function (res) {
      alert('已分享');
    },
    cancel: function (res) {
      alert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.3 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareQQ({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    complete: function (res) {
      alert(JSON.stringify(res));
    },
    success: function (res) {
      alert('已分享');
    },
    cancel: function (res) {
      alert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.4 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口
document.querySelector('#onMenuShareWeibo').onclick = function () {
  wx.onMenuShareWeibo({
	   title: title,
  desc: content,
	  link: '${ctx}/myzones.jsp',
	  imgUrl: linkJpg,
    trigger: function (res) {
      alert('用户点击分享到微博');
    },
    complete: function (res) {
      alert(JSON.stringify(res));
    },
    success: function (res) {
      alert('已分享');
    },
    cancel: function (res) {
      alert('已取消');
    },
    fail: function (res) {
      alert(JSON.stringify(res));
    }
  });
  alert('已注册获取“分享到微博”状态事件');
};
var shareData = {
  title: title,
  desc: content,
  link: window.location.href,
  imgUrl: linkJpg,
};
wx.onMenuShareAppMessage(shareData);
wx.onMenuShareTimeline(shareData);
});
wx.error(function (res) {
});

</script>
</body>
</html>